<?php
namespace Component\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
		$this->display();
	}

	public function leftbar(){
    $list=array(
      array("title"=>"测试1","url"=>"http://www.baidu.com"),
      array("title"=>"测试2","url"=>"http://www.baidu.com")
    );
		$this->ajaxReturn($list);
	}
	//新增
	public function addLeftbar(){
		$oop=M("ComLeftbar");
		$oop->create();
		if($oop->add())
			$this->ajaxReturn(1,"成功添加！",1);
		else
			$this->ajaxReturn(0,"添加失败，请重试！",0);
	}
}
